cmake_minimum_required(VERSION 3.10)
project(MyProgram)

# Set C++25 standard
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Extensions are allowed by default, so no need for CMAKE_CXX_EXTENSIONS

# Set build directory for all files
set(CMAKE_BINARY_DIR ${CMAKE_SOURCE_DIR}/build)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})

include_directories(include)
file(GLOB SOURCES 
    "sources/*.cpp"
    "src/core/BankAccount.cpp"
    "src/core/CheckingAccount.cpp"
    "src/core/Customer.cpp"
    "src/core/SavingsAccount.cpp"
    "src/system/BankSystem.cpp"
    "src/system/ReportGenerator.cpp"
    "src/system/Utils.cpp"
    "src/Transaction.cpp"
)

# 直接添加main.cpp到可执行文件构建列表中
add_executable(program 
    main.cpp  # 直接列出main.cpp
    ${SOURCES}
)
